﻿using System;

namespace _017_多维数组_矩形数组
{
    class Program
    {
        static void Main(string[] args)
        {
            int[,] matrix = new int[3, 3];
            for (int i = 0; i < matrix.GetLength(0); i++)
            {
                for (int j = 0; j < matrix.GetLength(1); j++)
                {
                    matrix[i, j] = i * 3 + j;
                }
            }

            foreach (int i in matrix)
            {
                Console.Write("{0} ", i);
            }

            Console.ReadKey();
        }
    }
}